import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
    {
      path: '/home',
      name: 'home',
      component: HomeView,
      children:[
        {
          path:'/home',
          redirect:'/home'
        },
        {
          path:'/home/about',
          component: ()=>import('../views/Home.vue')
        },
        {
          path:'/home/setting',
          component: ()=>import('../views/component/Setting.vue')
        }
      ]
    }
  ]
})

export default router
